package com.css.common.core.utils.idworker;


import com.css.common.core.utils.SpringContextHolder;
import com.css.common.core.utils.idworker.impl.IdWorker;

/**
 * id生成器
 */
public class IdWorkerUtils {

    private IdWorkerUtils(){}

    public static String nextStringId(){
        IIdWorker idWorker = SpringContextHolder.getBean(IdWorker.class);
        return idWorker.nextStringId();
    }

    public static Long nextLongId(){
        IIdWorker idWorker = SpringContextHolder.getApplicationContext().getBean(IdWorker.class);
        return idWorker.nextLongId();
    }
}
